﻿using IMaverick.Physics.Extensions;

namespace IMaverick.Physics
{
    public class Velocity : Dimension<Velocity>
    {
        static Velocity()
        {
            InitializeOrdersOfMagnitude("m/s");
            Units.Add(new Unit { Factor = 1.0m / 3.6m, Name = "km/h" });
            Units.Add(new Unit { Factor = 1.0m / 2.237m, Name = "mph" });
        }
        
        public Velocity() : base() { }
        private Velocity(Unit unit) : base(unit) { }

        public static Velocity MeterPerSecond { get { return new Velocity(); } }
        public static Velocity CentimeterPerSecond { get { return GetNewInstanceFor(OrderOfMagnitude.Centi); } }
        public static Velocity KilometerPerHour { get { return new Velocity(Units["km/h"]); } }
        public static Velocity MilesPerHour { get { return new Velocity(Units["mph"]); } }
    }
}
